﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Empires.PL.PageBuilder;
using Empires.CRL.DataContract;
using System.ComponentModel;
using Empires.CRL.Tools;

namespace Empires.PL.Web.Models
{
    /// <summary>
    /// 在线咨询
    /// </summary>
    public class OnlineModels : BaseModel
    {
        public int Mid { get; set; }
        public string Author { get; set; }
        public string Content { get; set; }
        public string Phone { get; set; }
        public string PostMode { get; set; }
    }

    public class ConsoleSignInModels : BaseModel
    {
        [PropertiesValidation("用户名输入有误",CommonRegexpLib.email)]
        public string UserName { get; set; }
        [PropertiesValidation("请输入您的密码", CommonRegexpLib.notEmpty)]
        public string PassWord { get; set; }
        public string SignInResult { get; set; }
    }

    public class BaseConfigModels : BaseModel
    {
        [PropertiesValidation("您的网站主题输入有误", CommonRegexpLib.stringValid)]
        public string Main { get; set; }
        [PropertiesValidation("您的网站标题输入有误", CommonRegexpLib.stringValid)]
        public string Title { get; set; }
        [PropertiesValidation("您的网站关键字输入有误", CommonRegexpLib.stringValid2)]
        public string KeyWord { get; set; }
        [PropertiesValidation("您的行业输入有误", CommonRegexpLib.integrated)]
        public int Calling { get; set; }
        [PropertiesValidation("您的首选客服QQ输入有误", CommonRegexpLib.integrated)]
        public string QQ1 { get; set; }
        [PropertiesValidation("您的备用客服QQ输入有误", CommonRegexpLib.integrated)]
        public string QQ2 { get; set; }
        [PropertiesValidation("您的Email地址输入有误", CommonRegexpLib.email)]
        public string EMail { get; set; }
         [PropertiesValidation("您的ICP地址输入有误", CommonRegexpLib.stringValid3)]
        public string ICP { get; set; }
    }

    public class AboutMGModels : BaseModel
    {
        //[PropertiesValidation("您的主题图片格式错误，仅支持jpg和png格式", CommonRegexpLib.isJPGorPNG)]
        //public string AboutUsImg { get; set; }
        [PropertiesValidation("请输入您的企业基本信息", CommonRegexpLib.notEmpty)]
        public string AboutContent { get; set; }
        /// <summary>
        /// 服务宗旨
        /// </summary>
        public string Qualification { get; set; }
        /// <summary>
        /// 专业经验
        /// </summary>
        public string Professional { get; set; }
        /// <summary>
        /// 企业文化
        /// </summary>
        public string Faith { get; set; }
        [PropertiesValidation("请输入您的企业地址", CommonRegexpLib.notEmpty)]
        public string Address { get; set; }
        public string ZipCode { get; set; }
        /// <summary>
        /// 服务热线
        /// </summary>
        [PropertiesValidation("请输入您公司的客服热线", CommonRegexpLib.notEmpty)]
        public string ServiceLine { get; set; }
    }

    public class NewsMGModels : BaseModel
    {
        [PropertiesValidation("请输入标题", CommonRegexpLib.notEmpty)]
        public string Title { get; set; }
        public string From { get; set; }
        [PropertiesValidation("请输入作者", CommonRegexpLib.notEmpty)]
        public string Author { get; set; }
        [PropertiesValidation("请输入内容", CommonRegexpLib.notEmpty)]
        public string Content { get; set; }
    }

    public class ProductMGModels : BaseModel
    {
        public string Pid { get; set; }
        [PropertiesValidation("标题输入有误",CommonRegexpLib.stringValid)]
        public string Title { get; set; }
        [PropertiesValidation("格式错误", CommonRegexpLib.stringValidAllowEmpty)]
        public string From { get; set; }
        [PropertiesValidation("作者输入有误", CommonRegexpLib.stringValid)]
        public string Author { get; set; }
        public string Date { get; set; }
        [PropertiesValidation("输入必须为数字", CommonRegexpLib.integrated1)]
        public string Hit { get; set; }
        [PropertiesValidation("必填",CommonRegexpLib.notEmpty)]
        public string Content { get; set; }
        //[PropertiesValidation("请选择jpg或png格式图片", CommonRegexpLib.isJPGorPNG)]
        public string URL { get; set; }
    }

    public class DownloadMGModels : BaseModel
    {
        [PropertiesValidation("输入错误", CommonRegexpLib.stringValid)]
        public string Title { get; set; }
        [PropertiesValidation("必填", CommonRegexpLib.notEmpty)]
        public string Author { get; set; }
        [PropertiesValidation("输入必须为数字", CommonRegexpLib.integrated1)]
        public int Hit { get; set; }
        [PropertiesValidation("必填", CommonRegexpLib.notEmpty)]
        public string URL { get; set; }
    }

    public class BlogMGModels : BaseModel
    {
        public int Bid { get; set; }
        [PropertiesValidation("输入有误",CommonRegexpLib.stringValid3)]
        public string Title { get; set; }
        [PropertiesValidation("输入有误", CommonRegexpLib.stringValid3)]
        public string Author { get; set; }
        [PropertiesValidation("输入必须为数字", CommonRegexpLib.integrated1)]
        public int Hit { get; set; }
        [PropertiesValidation("输入有误", CommonRegexpLib.notEmpty)]
        public string Content { get; set; }
        public string Date { get; set; }
        public string MainPhoto { get; set; }
    }
    public class OnlineMGModelas : BaseModel
    {
        public int Mid { get; set; }
        [PropertiesValidation("输入有误", CommonRegexpLib.stringValid)]
        public string Author { get; set; }
        [PropertiesValidation("输入有误", CommonRegexpLib.notEmpty)]
        public string Content { get; set; }
        /// <summary>
        /// 回复人
        /// </summary>
        public string Respondent { get; set; }
        [PropertiesValidation("输入有误", CommonRegexpLib.notEmpty)]
        public string Reply { get; set; }
        [PropertiesValidation("输入有误", CommonRegexpLib.matchPhone)]
        public string PHONE { get; set; }
    }

    public class BusinessMGModelas : BaseModel
    {
        public int Bid { get; set; }
        [PropertiesValidation("输入错误",CommonRegexpLib.stringValid)]
        public string Title { get; set; }
        [PropertiesValidation("输入错误", CommonRegexpLib.notEmpty)]
        public string Content { get; set; }
        public int Type { get; set; }
        public int Subject { get; set; }
    }
}